﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Sistema.WF.Componentes.FormulariosBase;

namespace Sistema.WF.View.Kernel
{

    public partial class FRM_progresso : FRM_pai
    {
        public FRM_progresso(Int32 max)
        {
            InitializeComponent();

            PGR_Progresso.Minimum = 0;
            PGR_Progresso.Maximum = max;
        }

        

        public void Avancar()
        {
            this.PGR_Progresso.Invoke(new MethodInvoker(delegate(){this.PGR_Progresso.Value++;}));
            
            LBL_percentual.Text = ((Int32)((PGR_Progresso.Value * 100) / PGR_Progresso.Maximum)).ToString()+" %";
            Application.DoEvents();

        }

        public void Fechar()
        {
            this.Close();
            this.Dispose();
        }



       


        #region TituloTela


        
        public String TituloTela
        {
            get{ return this.Text;}
            set{this.Text = value;}
        }
        
        #endregion
        #region Descricao
        public String Descricao
        {
            get { return LBL_descricao.Text; }
            set { LBL_descricao.Text = value; }
        }
        #endregion


    }
}
